﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FilterPattern
{
    public class FilterMale : Filter
    {
        public List<Person> MeetFilter(List<Person> persons)
        {
            List<Person> malePersons = new List<Person>();
            foreach (var item in persons)
            {
                if (item.GetGender().Equals("MALE", StringComparison.CurrentCultureIgnoreCase))
                {
                    malePersons.Add(item);
                }
            }

            return malePersons;
        }
    }
}
